package com.xt.purchasingsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xt.purchasingsystem.model.QualityDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
public interface QualityDetailMapper extends BaseMapper<QualityDetail> {
    /**
     * 根据指定天数和供应商编号查询这天所有的已合格总数
     * @param supplierId
     * @param day
     * @return
     */
    Long getSumAmountBySupplierIdAndDate(@Param("supplierId") String supplierId , @Param("day") int day);

    /**
     * 根据质检编号查询此编号对应的所有明细
     * @param qualityId
     * @return
     */
    List<QualityDetail> getAllQualityDetailByQualityId(String qualityId);
}
